package com.example.rabbitmqspringboot.consumer;
import com.example.rabbitmqspringboot.constant.ConfirmQueueConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ConfirmConsumer {

    @RabbitListener(queues = ConfirmQueueConstant.CONFIRM_QUEUE)
    public void receiveD(Message message) throws Exception {
        String msg = new String(message.getBody());
        log.info("收到发布确认队列信息：{}", msg);
    }
}